#ifndef __COMM_H__
#define __COMM_H__

#define TOTAL_KEY 	4
#define TOTAL_LED TOTAL_KEY
#define MSG_LEN 		11
#define BLINK_TIMES 2
#define SN_LEN 4

#define START_BYTE	0xA9
#define FUNC_SEND_BYTE		0XB4
#define FUNC_RECV_BYTE		0XC4
#define FUNC_MSG_CALL_BYTE	0x01
#define FUNC_MSG_CONTROL_BYTE	0x02
#define STOP_BYTE		0x05

#define LED_KEY1 OUT8
#define LED_KEY2 OUT9
#define LED_KEY3 OUT10
#define LED_KEY4 OUT11

#define LED_OFF 0x00
#define LED_ON 	0x01
#define LED_BLINK_ALWAYS 0x02
#define LED_BLINK_TWICE 0x03

//#define MAIN_Fosc		22118400L	//define main clock
#define MAIN_Fosc		11059200L	//define main clock

#endif //__TYPEDEF_H__